<template>
  <div v-loading="loading">
    <el-row :gutter="24">
      <!-- 左上角：基本信息 -->
      <el-col :span="24" class="detail-info-item">
  <el-card shadow="never">
    <template #header>
      <slot name="header">收款明细</slot>
    </template>
    <el-row>
     
        <el-table 
      :data="list" 
    > 
      <el-table-column align="center" label="付款方式" prop="dkfs"  />  
      <el-table-column align="center" label="打款账户" prop="dkzh"  />  
      <el-table-column align="center" label="打款公司名" prop="dkgsm"  />  
      <el-table-column align="center" label="收款账户" prop="skzh"  />  
      <el-table-column align="center" label="收款公司名" prop="skgsm"  />  
      <el-table-column align="center" label="金额" prop="je"  />  
      <el-table-column align="center" label="税率" prop="sl"  />  
      <el-table-column align="center" label="发票类型" prop="fplx"  />  
      <el-table-column align="center" label="状态" prop="zt"  />  
      <el-table-column align="center" label="开票日期" prop="kprq" width="200px"   />  
      <el-table-column align="center" label="收款日期" prop="skrq" width="200px" />  
      
    </el-table>   
    </el-row>
  </el-card>
      </el-col>
       
    </el-row> 
  </div>

  <!-- 表单弹窗：添加/修改 -->
  <UserForm ref="formRef" @success="getUserData(id)" />
</template>
<script lang="ts" setup>
import * as WalletApi from '@/api/pay/wallet/balance'
import * as UserApi from '@/api/member/user'
import { useTagsViewStore } from '@/store/modules/tagsView'
import UserForm from '@/views/member/user/UserForm.vue'
import UserAccountInfo from './UserAccountInfo.vue'
import daigouyingjian from './daigouyingjian.vue'
import UserBasicInfo from './UserBasicInfo.vue'
import UserBrokerageList from './UserBrokerageList.vue'
import jilu from './jilu.vue'
import ruanjiankaifa from './ruanjiankaifa.vue'
import wuliu from './wuliu.vue'
import neirongzhizuo from './neirongzhizuo.vue'
import sucaidaigou from './sucaidaigou.vue'
import qita from './qita.vue'
import renli from './renli.vue'
import dingzhiruanjian from './dingzhiruanjian.vue'
import { CardTitle } from '@/components/Card/index'
import { ElMessage } from 'element-plus'

defineOptions({ name: 'MemberDetail' })

const loading = ref(false) // 加载中
const user = ref<UserApi.UserVO>({} as UserApi.UserVO)

/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string) => {
  formRef.value.open(type, id)
}

/** 获得用户 */
const getUserData = async (id: number) => {
  loading.value = true
  try {
    user.value = await UserApi.getUser(id)
  } finally {
    loading.value = false
  }
}

const list = [{dkfs:'公账支付',dkzh:'13800138000',dkgsm:'数虎图像',skzh:'13800138001',skgsm:'联想天猫旗舰店',je:1000,sl:'6%',fplx:'专票',zt:'已收款',kprq:'2024-12-03 10:10:10',skrq:'2024-12-03 23:23:23'},{dkfs:'公账支付',dkzh:'13800138000',dkgsm:'数虎图像',skzh:'13800138001',skgsm:'联想天猫旗舰店',je:1000,sl:'13%',fplx:'普票',zt:'未收款',kprq:'2024-12-03 10:10:10',skrq:'-'}]

/** 初始化 */
const { currentRoute } = useRouter() // 路由
const { delView } = useTagsViewStore() // 视图操作
const route = useRoute()
 
onMounted(() => {
    
})
</script>
<style lang="css" scoped>
.detail-info-item:first-child {
  padding-left: 0 !important;
}

/* first-child 不生效有没有大佬给看下q.q */
.detail-info-item:nth-child(2) {
  padding-right: 0 !important;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
